package com.nunbey.lingxi.activities;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.nunbey.lingxi.R;
import com.nunbey.lingxi.activities.sub.SubBaseActivity;
import com.nunbey.lingxi.lincat.activityinit.BaseActivity;

public class SearchActivity extends SubBaseActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_search);
        this.setWebViewContent();
    }

    public static void startSearchActivity(Context context){
        context.startActivity(new Intent(context,SearchActivity.class));
    }

    private void setWebViewContent(){
        WebView webView = findViewById(R.id.activity_search_webView);
        //设置是否可以启用js
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl("http://www.39.net/");
    }
}